home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10383 < prev    next >
Encoding:
Text File  |  1996-08-05  |  785 b   |  32 lines

  1. Path: ix.netcom.com!netnews
  2. From: fame1@ix.netcom.com (Matt Kittleson)
  3. Newsgroups: comp.lang.c
  4. Subject: Function Offsets
  5. Date: Sun, 17 Mar 1996 13:19:40 GMT
  6. Organization: Netcom
  7. Message-ID: <4ih3p4$4gn@cloner4.netcom.com>
  8. NNTP-Posting-Host: sea-wa4-18.ix.netcom.com
  9. X-NETCOM-Date: Sun Mar 17  5:23:48 AM PST 1996
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Is this the best way to get the offset of a function?
  13.  
  14. void main()
  15. {
  16. void funct1()
  17.  
  18. some code here...blah...blah...blah
  19.  
  20. }
  21.  
  22. Would i then be able to printf the address out? Then if I loaded the
  23. program by just malloc'n the memory, jump to the function by
  24. subtracting offsets?  I have been meaning to try it, but have had
  25. little time.
  26.  
  27. Any other info on either this or dynamic linking in general would be
  28. greatly appreaciated.
  29.  
  30. Thanx
  31.  
  32.